package ch.ethz.group3.myalbum.client;

import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.menu.Menu;
import com.smartgwt.client.widgets.menu.MenuItem;

public class SettingsView extends Canvas {
	private boolean isOpen = true;

	public SettingsView() {

		Canvas main = new Canvas();
		main.setStyleName("settingMenu");

		Menu settings = new Menu();
		settings.setCanSelectParentItems(true);
		settings.setData(getLocalItemsAsArray());
		settings.setWidth(130);

		main.addChild(settings);

		main.draw();
	}

	public boolean getIsOpen() {
		return isOpen;
	}

	private MenuItem[] getLocalItemsAsArray() {

		MenuItem[] m = new MenuItem[3];

		m[0] = new MenuItem("Cambia Username");
		m[1] = new MenuItem("Cambia Password");
		m[2] = new MenuItem("Crea nuovo utente");

		return m;
	}
}